package com.siyu.test;
//@author 雷飞
//@email:1834250288@qq.com
//datetime:2022/6/14 21:58

import java.util.Scanner;

public class test1 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int applePrice=8;//苹果8/斤
        int strawberryPrice=13;//草莓13/斤
        while (true){
            System.out.println("请输入苹果的斤数");
            int apple = sc.nextInt();
            System.out.println("请输入草莓的斤数");
            int strawberry = sc.nextInt();
            if (apple>=0&&strawberry>=0){
                System.out.println("顾客A商品总价"+(apple*applePrice+strawberry*strawberryPrice)+"元");
                return;
            }else {
                System.out.println("输入参数有误，请重新输入");
            }
        }
    }
}
